import request from '@/utils/request'
import { GEN_SERVER } from '@/config/baseUrl'

// 查询产线人员数据列表
export function listWithUserInfo(data) {
  return request({
    url: GEN_SERVER['produce-server'] + '/data/erpProductionLine/listWithUserInfo',
    method: 'post',
    data: data
  })
}

// 查询产线人员数据详细
export function getDetailWithUserInfo(id) {
  return request({
    url: GEN_SERVER['produce-server'] + '/data/erpProductionLine/detailWithUserInfo',
    method: 'get',
    params: {
        id
    }
  })
}

// 新增/修改产线人员数据
export function updateUserInfo(data) {
  return request({
    url: GEN_SERVER['produce-server'] + '/data/erpProductionLine/updateUserInfo',
    method: 'post',
    data: data
  })
}

// 根据车间查询产线不可用人员
export function getUnSelectableUsernamesByWorkshopCode(workshopCode) {
  return request({
    url: GEN_SERVER['produce-server'] + '/data/erpProductionLine/getUnSelectableUsernamesByWorkshopCode',
    method: 'get',
    params: {
      workshopCode
    }
  })
}
